using System;
using System.Globalization;
using System.Windows.Data;

namespace PCR.Converter
{
	public class TemptChangeMaxConverter : IMultiValueConverter
	{
		public object Convert(object[] values, Type targetType, object parameter, CultureInfo culture)
		{
			int num = int.Parse(values[0].ToString());
			int num2 = int.Parse(values[1].ToString());
			int num3 = int.Parse(values[2].ToString());
			int num4 = int.Parse(values[3].ToString());
			double? num5 = 0.0;
			return ((num4 != 0) ? new double?((num - 4) / (num2 - num3 + 1)) : new double?((99 - num) / (num2 - num3 + 1))).Value;
		}

		public object[] ConvertBack(object value, Type[] targetTypes, object parameter, CultureInfo culture)
		{
			return null;
		}
	}
}
